<% content_for :sitemap do %>
  <a href="<%= cpanel_pages_path %>">Wiki</a> &gt;
  <a href="<%= cpanel_page_path(params[:page_id]) %>">Page:<%= params[:page_id] %></a> &gt;
  <span class="current">版本历史</span>
<% end %>
<h1>Wiki 列表</h1>

<table class="table table-bordered table-striped table-condensed">
  <tr class="head">
    <td class="first">Version</td>
    <td style="width:200px">Slug</td>
    <td>Title</td>
    <td>Desc</td>
    <td>Creator</td>
    <td>At</td>
    <td></td>
  </tr>

<% @page_versions.each do |item| %>
  <tr>
    <td class="first"><%= item.version %></td>
    <td><%= item.slug %></td>
    <td><%= item.title %></td>
    <td><%= item.desc %></td>
    <td><%= user_name_tag(item.user) %></td>
    <td><%= l item.created_at, format: :long %></td>
    <td><%= link_to 'View', cpanel_page_version_path(item.page_id, item.id) %>
    <%= link_to 'Revert', revert_cpanel_page_version_path(item.page_id, item.id), 'data-confirm' => 'Are you sure?', method: :post %></td>
  </tr>
<% end %>
</table>
<%= will_paginate @page_versions %>
